<template>
    <div class="centent-neirongdiv" @mouseenter="isnone = false" @mouseleave="isnone = true">
        <div class="centent-neirongright">
            <a href="#">
                <div class="centent-neirongdiv1">
                    {{ listdata.title }}
                </div>
                <div :class="lllll">
                    {{ listdata.content }}
                </div>
            </a>
            <div class="centent-neirongdiv3">
                <a href="#" class="cententa cententa1">
                    {{ listdata.author }}
                </a>
                <span class="cententspan">|</span>
                <a href="#" class="cententa cententa2">
                    <span class="iconfont icon-mtiIcon-caozuo-xiangyou2"></span>
                    {{ listdata.visits }}
                </a>
                <a href="#" class="cententa cententa3">
                    <span class="iconfont icon-mtiIcon-caozuo-xiangyou2"></span>
                    <span class="num">{{ listdata.collection }}</span>
                </a>
                <a href="#"><span class="cententspan2" :class="{ cententspannone: isnone }">· · ·</span></a>
                <a href="#" class="cententa4">{{ listdata.type }}</a>
            </div>
        </div>
        <a href="#" v-show="listdata.imgstatus"><img :src="getAssetsFile(listdata.imgsrc as string)" alt=""
                class="centent-neirongimg"></a>
    </div>
</template>

<script setup lang="ts">
import { computed, defineProps, ref } from 'vue';
import { getAssetsFile } from '@/util/utils';

const isnone = ref(true);
const props = defineProps({
    title: String,
    content: String,
    author: String,
    visits: String,
    collection: String,
    type: String,
    imgsrc: String,
    imgstatus: Boolean,
});

const centent2 = 'centent-neirongdiv2'
const centent3 = 'centent-neeeeeee'

const listdata = ref({
    ...props
});

const lllll = computed(() => {
    return listdata.value.imgstatus ? centent2 : centent3
})


</script>

<style lang="scss" scoped>
@import url(../../../assets/incontent.scss);


</style>